home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / ANC_UTULITYS_16.adf / arclist / asm1.arc / Avail.S next >
Text File  |  1988-09-21  |  607b  |  50 lines

  1. ;
  2. ;        AvailMem Proggy.
  3. ;
  4.  
  5. beg:
  6. moveq    #0,d1
  7. move.l    4.w,a6
  8. jsr    -216(a6)
  9. move.l    d0,d7
  10. lea    Workie,a0
  11. lea    10(a0),a0
  12. moveq    #8,d5
  13. loop:
  14. divu    #10,d0
  15. move.l    d0,d1
  16. swap    d0
  17. clr.w    d0
  18. swap    d0
  19. swap    d1
  20. and.b    #$f,d1
  21. add.b    #'0',d1
  22. move.b    d1,-(a0)
  23. dbf    d5,loop
  24.  
  25. moveq    #0,d0
  26. lea    DosLib,a1
  27. jsr    -552(a6)            ; OpenLibrary
  28. move.l    d0,a6
  29.  
  30. jsr    -60(a6)
  31. move.l    d0,d6                ; Output handle
  32.  
  33. move.l    d0,d1
  34. move.l    #Msg,d2
  35. move.l    #em-msg,d3
  36. jsr    -48(a6)                ; Write it to screen
  37.  
  38. move.l    a6,a1
  39. move.l    4.w,a6
  40. jsr    -414(a6)            ; CloseLibrary
  41. moveq    #0,d0
  42. rts
  43.  
  44. Msg:dc "Available Mem:"
  45. Workie:dc "           Bytes",$0a
  46. em:
  47.  
  48. even
  49. doslib:dc "dos.library",0
  50.